import React from 'react';
import styled from './index.module.css';
import { FooterProps } from '../../types';
export default function Footer({ totalPrice, settlement, title, isDisabled = false }: FooterProps) {
    const settlementFooter = () => {
        settlement();
    };
    return (
        <div className={styled.footer}>
            <div className={styled.countPrice}>
                Total Amount: <span>${totalPrice}</span>
            </div>
            <div
                onClick={settlementFooter}
                className={[styled.submit, isDisabled ? styled.disabled : ''].join(' ')}
            >
                {title}
            </div>
        </div>
    );
}
